package com.san.hkhospital.controller;
import com.san.hkhospital.entity.Patient;
import com.san.hkhospital.service.PatientService;
import com.san.hkhospital.service.impl.PatientServiceImpl;
import com.san.hkhospital.vo.ResultVO;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* (patient)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/patient")
public class PatientController {
/**
* 服务对象
*/
@Resource
private PatientServiceImpl patientServiceImpl;
@Resource
private PatientService patientService;
/**
* 通过主键查询单条数据
*
* @param
* @return 单条数据
*/
//@GetMapping("selectOne")
//public Patient selectOne(Integer id) {
//return patientServiceImpl.selectByPrimaryKey(id);
//}
@GetMapping
    public ResultVO selectList(){
    List<Patient> patientList =  patientService.selectList();
    return ResultVO.success("患者查询成功！",patientList);
}
}
